package javaMetaModel;

import java.util.ArrayList;
import java.util.List;
import javaMetaModel.visitor.IMetaModelVisitor;

public class MetaInterface extends MetaClassifier {

	private final List<String> mExtends = new ArrayList<String>();

	private final List<MethodeSignature> mMethods = new ArrayList<MethodeSignature>();

	public MetaInterface() {
		this("NewInterface");
	}

	public MetaInterface(String aName) {
		super(aName);
	}

	public void addMethod(Methode aMethode) {
		this.addMethod(aMethode.getSignature());
	}

	public void addMethod(MethodeSignature aMethodeSignature) {
		this.mMethods.add(aMethodeSignature);
	}

	public void removeMethod(Methode aMethode) {
		this.removeMethod(aMethode.getSignature());
	}

	public void removeMethod(MethodeSignature aMethodeSignature) {
		this.mMethods.remove(aMethodeSignature);
	}

	public void accept(IMetaModelVisitor aVisitor) {
		aVisitor.visitInterface(this);
	}

	public List<String> getExtends() {
		return mExtends;
	}

	public void addExtends(MetaInterface anInterface) {
		this.mExtends.add(anInterface.getCompleteName());
	}

	public void removeExtends(MetaInterface anInterface) {
		this.mExtends.remove(anInterface.getCompleteName());
	}

	public void addExtends(String anInterface) {
		this.mExtends.add(anInterface);
	}

	public void removeExtends(String anInterface) {
		this.mExtends.remove(anInterface);
	}

	public List<MethodeSignature> getMethods() {
		return mMethods;
	}

	@Override
	public void setComment(String aComment) {
		this.mComments.setComment(aComment);
	}
}
